<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>{$data.name}</title>
    <link rel="stylesheet" href="__STATIC__assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="__STATIC__assets/module/admin.css?v=318"/>
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        /** 应用快捷块样式 */
        .console-app-group {
            padding: 16px;
            border-radius: 4px;
            text-align: center;
            background-color: #fff;
            cursor: pointer;
            display: block;
        }

        .console-app-group .console-app-icon {
            width: 32px;
            height: 32px;
            line-height: 32px;
            margin-bottom: 6px;
            display: inline-block;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
            font-size: 32px;
            color: #69c0ff;
        }

        .console-app-group:hover {
            box-shadow: 0 0 15px rgba(0, 0, 0, .08);
        }

        /** //应用快捷块样式 */

        /** 小组成员 */
        .console-user-group {
            position: relative;
            padding: 10px 0 10px 60px;
        }

        .console-user-group .console-user-group-head {
            width: 32px;
            height: 32px;
            position: absolute;
            top: 50%;
            left: 12px;
            margin-top: -16px;
            border-radius: 50%;
        }

        .console-user-group .layui-badge {
            position: absolute;
            top: 50%;
            right: 8px;
            margin-top: -10px;
        }

        .console-user-group .console-user-group-name {
            line-height: 1.2;
        }

        .console-user-group .console-user-group-desc {
            color: #8c8c8c;
            line-height: 1;
            font-size: 12px;
            margin-top: 5px;
        }

        /** 卡片轮播图样式 */
        .admin-carousel .layui-carousel-ind {
            position: absolute;
            top: -41px;
            text-align: right;
        }

        .admin-carousel .layui-carousel-ind ul {
            background: 0 0;
        }

        .admin-carousel .layui-carousel-ind li {
            background-color: #e2e2e2;
        }

        .admin-carousel .layui-carousel-ind li.layui-this {
            background-color: #999;
        }

        /** 广告位轮播图 */
        .admin-news .layui-carousel-ind {
            height: 45px;
        }

        .admin-news a {
            display: block;
            line-height: 70px;
            text-align: center;
        }

        /** 最新动态时间线 */
        .layui-timeline-dynamic .layui-timeline-item {
            padding-bottom: 0;
        }

        .layui-timeline-dynamic .layui-timeline-item:before {
            top: 16px;
        }

        .layui-timeline-dynamic .layui-timeline-axis {
            width: 9px;
            height: 9px;
            left: 1px;
            top: 7px;
            background-color: #cbd0db;
        }

        .layui-timeline-dynamic .layui-timeline-axis.active {
            background-color: #0c64eb;
            box-shadow: 0 0 0 2px rgba(12, 100, 235, .3);
        }

        .dynamic-card-body {
            box-sizing: border-box;
            overflow: hidden;
        }

        .dynamic-card-body:hover {
            overflow-y: auto;
            /** padding-right: 9px; */
        }

        /** 优先级徽章 */
        .layui-badge-priority {
            border-radius: 50%;
            width: 20px;
            height: 20px;
            padding: 0;
            line-height: 18px;
            border-width: 2px;
            font-weight: 600;
        }
    </style>
</head>
<body>
<!-- 正文开始 -->
<div class="layui-fluid ew-console-wrapper">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md3">
            <div class="layui-card">
                <div class="layui-card-header">
                    今日<span class="layui-badge layui-badge-green pull-right">金额</span>
                </div>
                <div class="layui-card-body">
                    <p class="lay-big-font">{$data.todayMoney_jintian} <span style="font-size: 22px;line-height: 1;">元</span></p>
                    <p>昨日<span class="pull-right">{$data.todayMoney_zuotian} 元</span></p>
                </div>
            </div>
        </div>
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md3">
            <div class="layui-card">
                <div class="layui-card-header">
                    今日<span class="layui-badge layui-badge-blue pull-right">订单量</span>
                </div>
                <div class="layui-card-body">
                    <p class="lay-big-font">{$data.todayOrder_jintian} <span style="font-size: 22px;line-height: 1;">笔</span></p>
                    <p>昨日<span class="pull-right">{$data.todayOrder_zuotian} 笔</span></p>
                </div>
            </div>
        </div>
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md3">
            <div class="layui-card">
                <div class="layui-card-header">
                    今日<span class="layui-badge layui-badge-red pull-right">手续费</span>
                </div>
                <div class="layui-card-body">
                    <p class="lay-big-font">{$data.todayshoxuf_jintian} <span style="font-size: 22px;line-height: 1;">元</span></p>
                    <p>昨日<span class="pull-right">{$data.todayshoxuf_zuotian} 元</span></p>
                </div>
            </div>
        </div>
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md3">
            <div class="layui-card">
                <div class="layui-card-header">
                    商户总数
                    <span class="icon-text pull-right" lay-tips="商户" lay-direction="4" lay-offset="5px,5px">
                        <i class="layui-icon layui-icon-user"></i>
                    </span>
                </div>
                <div class="layui-card-body">
                    <p class="lay-big-font">{$data.user_jintian} <span style="font-size: 22px;line-height: 1;">位</span></p>
                    <p>今日新增<span class="pull-right">{$data.user_zuotian} 人</span></p>
                </div>
            </div>
        </div>
    </div>
    <!-- 快捷方式 -->
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm2" style="padding-bottom: 0;">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-xs6 layui-col-sm12">
                    <div class="console-app-group" ew-href="{:url('admin/config')}" ew-title="基础配置">
                        <i class="console-app-icon layui-icon layui-icon-set" style="color: #ff9c6e;"></i>
                        <div class="console-app-name">基础配置</div>
                    </div>
                </div>
                <div class="layui-col-xs6 layui-col-sm12">
                    <div class="console-app-group" ew-href="{:url('admin/game')}" ew-title="通道配置">
                        <i class="console-app-icon layui-icon layui-icon-app"
                           style="color: #b37feb;font-size: 30px;"></i>
                        <div class="console-app-name">通道配置</div>
                    </div>
                </div>
                <div class="layui-col-xs6 layui-col-sm12">
                    <div class="console-app-group" ew-href="{:url('admin/user')}" ew-title="商户管理">
                        <i class="console-app-icon layui-icon layui-icon-group"
                           style="font-size: 26px;padding-top: 3px;margin-right: 6px;"></i>
                        <div class="console-app-name">商户管理</div>
                    </div>
                </div>
                <div class="layui-col-xs6 layui-col-sm12">
                    <div class="console-app-group" ew-href="{:url('admin/orders')}" ew-title="订单管理">
                        <i class="console-app-icon layui-icon layui-icon-cart" style="color: #95de64;"></i>
                        <div class="console-app-name">订单管理</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-sm6" style="padding-bottom: 0;">
            <div class="layui-row layui-col-space15">
             <div class="layui-col-xs12 layui-col-sm6 layui-col-md12">
         
         <div class="layui-col-xs12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-tab layui-tab-brief" lay-filter="tabZZT">
                        <ul class="layui-tab-title">
                            <li class="layui-this">订单数量</li>
                            <li>成交金额</li>
                        </ul>
                        <div class="layui-tab-content">
                            <div class="layui-tab-item layui-show">
                                <div class="layui-row layui-col-space30">
                                    <div class="layui-col-xs12 layui-col-md12">
                                        <div id="xse" style="height: 300px;margin-top: 20px;"></div>
                                    </div>
                                   
                                </div>
                            </div>
                            <div class="layui-tab-item">
                                <div class="layui-row layui-col-space30">
                                    <div class="layui-col-xs12 layui-col-md12">
                                        <div id="fwl" style="height: 300px;margin-top: 20px;"></div>
                                    </div>
                                    
                                </div>
                            </div>
                            
                        </div>
                    </div>
                </div>
            </div>
        </div>
         </div>   
            </div>
        </div>
            <div class="layui-col-sm4" style="padding-bottom: 0;">
            <div class="layui-row layui-col-space15">
             <div class="layui-col-xs12 layui-col-sm6 layui-col-md12">
         
             <div class="layui-col-xs12">
           <div class="layui-card">
                <div class="layui-card-header">系统信息</div>
                <div class="layui-card-body">
                    <table class="layui-table layui-text">
                        <colgroup>
                            <col width="90">
                            <col>
                        </colgroup>
                        <tbody>
                           
                            <tr>
                                <td>系统名称</td>
                                <td>云喵码支付</td>
                            </tr>
                            <tr>
                                <td>系统类型</td>
                                <td>多商户</td>
                            </tr>
                       
                             <tr>
                                <td>系统版本</td>
                                <td>V{$data.ver}</td>
                             </tr> 
                       
                             <tr>
                                <td>源码作者</td>
                                <td><a href="//shoquan.xyz/" target="_blank">云喵</a></td>
                             </tr> 
                       
                             <tr>
                                <td>检测更新</td>
                                <td><button type="button" class="layui-btn layui-btn-xs" onclick="getqrcode();" >检测</button></td>
                             </tr> 
                             
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
       
         </div>    
         <div class="layui-col-xs12 layui-col-sm6 layui-col-md12">
         <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">免责声明</div>
                        <div class="layui-card-body dynamic-card-body mini-bar" style="height: 190px;">
                            <ul class="layui-timeline layui-timeline-dynamic">
                                
                                <li>
                                   <p>1,云喵码支付请用于正规用途！！</p> 
                                   <p>2, 云喵码支付只供学习使用，如用于商业活动与作者无关！！</p> 
                                   <p>3, 用来进行违反中国法律用户跟作者一切无关！！</p> 
                                   <p>4, 不得将云喵码支付和程序挪作商业或盈 利用途！！</p> 
                                   <p>5, 请在下载后24小时内删除！否则，由此产生的后 果由挪用者本人负责，作者不承担任何法律责任！！</p> 
                                   <p>6, 下载即认同以上原则！！</p> 
                                </li>
                                
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
         
      
   
</div>
<!-- js部分 -->
<script type="text/javascript" src="__STATIC__assets/js/jquery@1.11.3.js"></script>
<script type="text/javascript" src="__STATIC__assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="__STATIC__assets/js/common.js?v=318"></script>
<script src="__STATIC__assets/libs/echarts/echarts.min.js"></script>
<script src="__STATIC__assets/libs/echarts/echartsTheme.js"></script>
<script>
    layui.use(['layer', 'carousel', 'admin','element'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var carousel = layui.carousel;
        var device = layui.device();
        var element = layui.element;
        var admin = layui.admin;
        // 渲染轮播
        carousel.render({
            elem: '#workplaceNewsCarousel',
            width: '100%',
            height: '70px',
            arrow: 'none',
            autoplay: true,
            trigger: device.ios || device.android ? 'click' : 'hover',
            anim: 'fade'
        });
        
         // 渲染销售额图表
        var myCharts3 = echarts.init(document.getElementById('xse'), myEchartsTheme);
        var option3 = {
            title: {
                text: '成交订单数（笔）',
                textStyle: {
                    color: '#000',
                    fontSize: 14
                }
            },
            tooltip: {},
            grid: {
                left: '0',
                right: '0',
                bottom: '0',
                containLabel: true
            },
            xAxis: {
                data: eval(["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"])
            },
            yAxis: {},
            series: [{
                type: 'bar',
                data: {$data.fhsjaj2},
                barMaxWidth: 45
            }]
        };
        myCharts3.setOption(option3);

        // 渲染访问量图表
        var myCharts4 = echarts.init(document.getElementById('fwl'), myEchartsTheme);
        var option4 = {
            title: {
                text: '成交订单金额（元）',
                textStyle: {
                    color: '#000',
                    fontSize: 14
                }
            },
            tooltip: {},
            grid: {
                left: '0',
                right: '0',
                bottom: '0',
                containLabel: true
            },
            xAxis: {
                data: eval(["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"])
            },
            yAxis: {},
            series: [{
                type: 'bar',
                data: {$data.fhsjaj1},
                barMaxWidth: 45
            }]
        };
        myCharts4.setOption(option4);

        // 切换选项卡重新渲染
        element.on('tab(tabZZT)', function (data) {
            if (data.index == 0) {
                myCharts3.resize();
            } else if(data.index == 1) {
                myCharts4.resize();
            } else {
                myCharts5.resize();
            }
        });

        // 窗口大小改变事件
        window.onresize = function () {
            myCharts3.resize();
            myCharts4.resize();
            myCharts5.resize();
        };

    });
    function getqrcode(){
        var loadIndex = layer.load();
        $.post('check_version', function(res){
            layer.close(loadIndex);
                if (res.code === 1) {
                    layer.msg(res.msg, {icon: 1, anim: 6});
               } else {
                layer.confirm('<img style="max-width: 100%;" src="__STATIC__assets/images/tongzhi.jpg" /><br>'+res.msg, {
                title: '发现新版本',
                btn: ['下一步', '官方Q群', '取消'],
                shade: .1,
                skin: 'layui-layer-admin'
                }, function (i) {
                layer.alert(res.data.sm, {
                title: '更新日记',
                btn: ['确认更新'],
                shade: .1,
                skin: 'layui-layer-admin'
                }, function (i) {
                    var loadIndex = layer.load();
                    $.post('system_update', function(res){
                        layer.close(loadIndex);
                        if (res.code === -1) {
                            layer.msg(res.msg, {icon: 2, anim: 6});
                        }else if (res.code === 1) {
                            layer.msg(res.msg, {icon: 1, anim: 6});
                        }else{
                            layer.msg(res.msg, {icon: 1, anim: 6}, function(){
                                window.location.reload();
                            });
                        }
                    }, 'json'); 
                    
                    });
                                
                }, function(i){
                    window.location.href=res.data.qqu;
                });
               }
        }, 'json');
    }
</script>
</body>
</html>